<?php
use \sy\base\i18n;
use \blog\libs\BHtml;
if (!class_exists('Sy')) {
	exit;
}
?>
<!DOCTYPE html>
<html>
<head>
	<title>附件管理</title>
	<?php Sy::view('admin/common/header'); ?>
</head>
<body>
	<?php Sy::view('admin/common/navbar', ['page' => 'content']); ?>
	<div class="page-content">
		<div id="attachmentList" class="attachment-list"></div>
		<div id="loading_bottom" class="preloader-wrapper big active" style="display:none"><div class="spinner-layer spinner-blue"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer spinner-red"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer spinner-yellow"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer spinner-green"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div>
		<h5	id="none" class="center-align">没有了</h5>
	</div>
	<div id="attachmentEdit" class="modal">
		<div class="modal-content">
			<h4>编辑附件信息</h4>
			<input type="hidden" name="id"/>
			<div class="row">
				<div class="input-field col s12">
					<input name="name" type="text"/>
					<label class="active">名称</label>
				</div>
				<div class="input-field col s12">
					<input name="url" type="text" readonly="true"/>
					<label class="active">地址</label>
				</div>
			</div>
		</div>
		<div class="modal-footer">
			<a id="attachment_submit" class="waves-effect btn-flat">保存</a>
			<a class="modal-action modal-close waves-effect btn-flat">取消</a>
		</div>
	</div>
	<script>window.sy = {
		"url": {
			"img": "<?=Sy::createUrl()?>assets/image",
			"list": "<?=Sy::createUrl('admin/attachment/list', 'json')?>",
			"attachmentEdit": "<?=Sy::createUrl('admin/attachment/edit', 'json')?>",
			"attachmentDel": "<?=Sy::createUrl('admin/attachment/del', 'json')?>"
		},
		"page": "AttachmentManage"
	};</script>
	<?php Sy::view('admin/common/footer'); ?>
</body>
</html>